export const toFile = (stream, title) => {
  const blob = new Blob([stream], { type: 'application/vnd.ms-excel' });
  const objectUrl = URL.createObjectURL(blob);
  const a = document.createElement('a');
  a.setAttribute('href', objectUrl);
  a.setAttribute('download', title);
  a.click();
};
